import Layout from '../views/layout/Layout'

const _import = require('./_import_' + process.env.NODE_ENV);

export default {
  path: '/boxup',
  name: 'boxup',
  component: Layout,
  meta: { title: '箱起管理', icon: 'icon' },
  children: [
    {
      path: 'box',
      component: _import('activity/box/list'),
      name: 'activityBox',
      meta: {
        title: '箱起活动管理',
        buttons: {
          add: { label: '新建', enabled: true },
          edit: { label: '编辑', enabled: true },
          goodsList: { label: '商品管理', enabled: true },
          fail: { label: '失效', enabled: true },
          // giftBag: { label: '箱起礼包', enabled: true },
          // giftBagAdd: { label: '新建箱起礼包', enabled: true },
          // giftBagEdit: { label: '编辑箱起礼包', enabled: true },
          // giftBagView: { label: '查看箱起礼包', enabled: true },
          // bonus: { label: '奖金配置', enabled: true },
          // bonusAdd: { label: '新建奖金配置', enabled: true },
          // bonusEdit: { label: '编辑奖金配置', enabled: true },
          // bonusView: { label: '查看奖金配置', enabled: true },
          // bonusHide: { label: '隐藏奖金配置', enabled: true },
          // export: { label: '导出', enabled: true },
          // orderQuery: { label: '申购单查询', enabled: true },
          // orderQueryRemind: { label: '申购单查询-提醒', enabled: true },
          // orderQueryView: { label: '申购单查询-查看', enabled: true },
          // yuncangQuery: { label: '云仓库存查询', enabled: true },
          // yuncangQueryDetails: { label: '云仓库存查询-下单明细', enabled: true },
          // yuncangQueryInventory: { label: '云仓库存查询-维护库存', enabled: true }
        }
      }
    },
    {
      path: 'box/goods/:id',
      component: _import('activity/box/goods/index'),
      name: 'activityBoxGoodsList',
      meta: {
        title: '管理箱起商品',
        index: '/boxup/box',
        noCache: true,
      },
      props: true,
      hidden: true
    },
    {
      path: 'boxBonus',
      component: _import('activity/boxBonus/list'),
      name: 'boxBonus',
      meta: {
        title: '奖金配置',
        // index: '/activity/box',
        buttons: {
          add: { label: '新建奖金配置', enabled: true },
          edit: { label: '编辑奖金配置', enabled: true },
          view: { label: '查看奖金配置', enabled: true },
          hide: { label: '隐藏奖金配置', enabled: true },
          addLink: { label: '新建奖金配置链接', enabled: true },
          editMoreBonus: { label: '编辑多奖金模式', enabled: true },
          viewMoreBonus: { label: '查看多奖金模式', enabled: true },
          hideMoreBonus: { label: '隐藏多奖金模式', enabled: true },
          delMoreBonus: { label: '删除多奖金模式', enabled: true }
        }
      }
    },
    {
      path: 'boxBonus/add',
      component: _import('activity/boxBonus/edit'),
      name: 'boxBonusAdd',
      meta: {
        title: '奖金配置新建',
        index: '/activity/boxBonus'
      },
      hidden: true
    },
    {
      path: 'boxBonus/edit',
      component: _import('activity/boxBonus/edit'),
      name: 'boxBonusEdit',
      meta: {
        title: '奖金配置编辑',
        index: '/activity/boxBonus',
        noCache: true
      },
      hidden: true
    },
    {
      path: 'boxBonus/view',
      component: _import('activity/boxBonus/edit'),
      name: 'boxBonusView',
      meta: {
        title: '奖金配置查看',
        index: '/activity/boxBonus',
        noCache: true
      },
      hidden: true
    },
    {
      path: 'boxGiftBag',
      component: _import('activity/boxGiftbag/list'),
      name: 'boxGiftBag',
      meta: {
        title: '箱起礼包',
        // index: '/activity/box',
        buttons: {
          add: { label: '新建箱起礼包', enabled: true },
          edit: { label: '编辑箱起礼包', enabled: true },
          view: { label: '查看箱起礼包', enabled: true }
        }
      }
    },
    {
      path: 'boxGiftBag/add',
      component: _import('activity/boxGiftbag/edit'),
      name: 'boxGiftBagAdd',
      meta: {
        title: '箱起礼包新建',
        index: '/activity/boxGiftBag'
      },
      hidden: true
    },
    {
      path: 'boxGiftBag/edit',
      component: _import('activity/boxGiftbag/edit'),
      name: 'boxGiftBagEdit',
      meta: {
        title: '箱起礼包编辑',
        noCache: true,
        index: '/activity/boxGiftBag'
      },
      hidden: true
    },
    {
      path: 'boxGiftBag/view',
      component: _import('activity/boxGiftbag/edit'),
      name: 'boxGiftBagView',
      meta: {
        title: '箱起礼包查看',
        index: '/activity/boxGiftBag',
        noCache: true
      },
      hidden: true
    },
    {
      path: 'orderQuery',
      component: _import('activity/box/order/index'),
      name: 'orderQuery',
      meta: {
        title: '申购单查询',
        // index: '/activity/box',
        buttons: {
          remind: { label: '提醒', enabled: true },
          view: { label: '查看', enabled: true }
        }
      }
    },
    {
      path: 'yuncangQuery',
      component: _import('activity/box/yuncang/index'),
      name: 'yuncangQuery',
      meta: {
        title: '云仓库存查询',
        // index: '/activity/box',
        buttons: {
          details: { label: '下单明细', enabled: true },
          inventory: { label: '维护库存', enabled: true },
          change: { label: '库存转换记录', enabled: true }
        }
      }
    },
    {
      path: 'yuncangChange',
      component: _import('activity/box/yuncangChange/index'),
      name: 'yuncangChange',
      meta: {
        title: '云仓库存转换',
        buttons: {
          add: { label: '新增', enabled: true },
          edit: { label: '编辑', enabled: true },
          del: { label: '移除', enabled: true }
        }
      }
    },
    {
      path: 'approvalManage',
      component: _import('activity/box/approvalManage/index'),
      name: 'approvalManage',
      meta: {
        title: '申购审批管理',
        buttons: {
          change: { label: '变更', enabled: true }
        }
      }
    },
    {
      path: 'inventoryRelease',
      component: _import('activity/box/inventoryRelease/index'),
      name: 'inventoryRelease',
      meta: {
        title: '云仓库存下拨',
        buttons: {
          add: { label: '新增', enabled: true },
          edit: { label: '编辑', enabled: true },
          failure: { label: '失效/已失效', enabled: true }
        }
      }
    },
    {
      path: 'yuncangTable',
      component: _import('activity/box/yuncangTable/index'),
      name: 'yuncangTable',
      meta: {
        title: '云仓库存出入库明细'
      }
    },
  ]
}
